import logging
import yaml
import yagmail


#封装邮件
def setuo(filep):
    mail=yagmail.SMTP(user='1006142636@qq.com',host='smtp.qq.com',password='mduzpggkpknubgac')
    mail.send(to='1006142636@qq.com',subject='孔夫子报告',contents='今日报告,请查看',attachments=filep)


#封装日志
def set():
    logging.basicConfig(filename='kongfzi1.txt',format='%(asctime)s ->%(levelname)s ->%(message)s',filemode='w+',level=logging.DEBUG)


#读取yaml文件
def se(filep):
    with open(filep,'r',encoding='utf-8')as e:
        return yaml.safe_load(e)



